<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>CSS多行文字垂直居中的两种方法-1</title>
        <style>
            .middle-box{display: table; height: 300px; border:1px solid #ff0000; width:400px; margin:0 auto; position:relative;}
            .middle-inner{display: table-cell; vertical-align:middle; *position:absolute; *top:50%; *left:50%; width:100%; text-align:center;}
            .middle-inner p{position:relative; *top:-50%; *left:-50%;}
        </style>
    </head>
    <body>
        <h1>CSS多行文字垂直居中的两种方法-1</h1>
        <p>来源:<a href="http://caibaojian.com/css-vertical-middle.html">网址</a></p>
        <div class="middle-box">
            <div class="middle-inner">
                <p><span class="suc-tip">前端开发博客，专注前端开发和web教程</span><br/><span class="suc-link">快捷入口：<a href="http://caibaojian.com">http://caibaojian.com</a></span></p>
                <p style="display:none;"><span class="suc-tip">5年的老博客，一直致力于WEB开发</span></p>
            </div>
        </div>
    </body>
</html>